package com.pengshun.modules.api.transport.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pengshun.modules.api.coal.validator.First;
import com.pengshun.modules.api.coal.validator.Second;
import com.pengshun.modules.api.coal.validator.Third;
import com.pengshun.modules.domain.TransportAbnormal;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("异常运单操作")
public class TransportAbnormalOperationDto {

    //主键id
    private Long transportAbnormalOperationId;

    @NotNull(message = "结算id不能为空", groups = {First.class, Second.class, Third.class})
    private Long freightSettlementId;
    private Long userId;
    private String userName;
    @NotNull(message = "备注不能为空", groups = {First.class,Third.class})
    private String remark;
    //1申请处理2处理完成3处理失败
    @NotNull(message = "status不能为空", groups = {Third.class})
    private String status;
    //证据
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;
    @NotNull(message = "photos集合不能为空", groups = {First.class})
    private List<TransportAbnormal> photos;

}
